#ifndef ELS_LSINPUT_H_
#define ELS_LSINPUT_H_

#include "els.h"
#include "lsnput_script.h"

int ELSAPI_lsnput_GetMousePosition(els_VmObj* vm);
int ELSAPI_lsnput_SetMousePosition(els_VmObj* vm);
int ELSAPI_lsnput_MouseAct(els_VmObj* vm);
int ELSAPI_lsnput_click(els_VmObj *vm);

void ElsLib_lsnput_libinit(els_VmObj *vm)
{
    LosuObj lib = obj_newunit(vm);

    vm_setval(vm, "lsnput", &lib);

    obj_setunit(vm, lib, obj_newstr(vm, "get_mouse_position"), obj_newfunction(vm, ELSAPI_lsnput_GetMousePosition));
    obj_setunit(vm, lib, obj_newstr(vm, "set_mouse_position"), obj_newfunction(vm, ELSAPI_lsnput_SetMousePosition));
    obj_setunit(vm, lib, obj_newstr(vm, "mouse_act"), obj_newfunction(vm, ELSAPI_lsnput_MouseAct));
    obj_setunit(vm, lib, obj_newstr(vm, "click"), obj_newfunction(vm, ELSAPI_lsnput_click));
    //obj_setunit(vm, lib, obj_newstr(vm, ""), obj_newfunction(vm, ELSAPI_lsnput_));

    vm_dostring(vm, lsnput_script);
}

#endif
